package com.caird.pmp.iot.service;

import com.alibaba.fastjson.JSONObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "iot-service", url = "http://127.0.0.1:8080/pmp-admin")
public interface IIotService {

    /**
     * 获取所有SIM卡号拼接字符串
     */
    @RequestMapping(value = "/iot/device/getSimNoList",
            method = RequestMethod.GET,
            produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    JSONObject getSimNoList();

    /**
     * 生产注册设备
     */
    @RequestMapping(
            value = "/iot/device/produce",
            method = RequestMethod.GET,
            produces = MediaType.APPLICATION_JSON_UTF8_VALUE
    )
    JSONObject produceDevice(@RequestParam(name="batchCode") String batchCode,
                             @RequestParam(name="mcuId") String mcuId,
                             @RequestParam(name="iccid") String iccid,
                             @RequestParam(name="report") String report);
}
